<template>
  <div class="layout-content-body">
    <player 
      :play-list="playList" 
      :is-live="isLive"
    />
  </div>
</template>

<script>
// import api from '@/api'
import player from '@/components/player/player.vue';
export default {
  components: {
    player
  },
  data: function () {
    return {
      playList: [],
      isLive: false
    };
  },
  mounted () {
    this.getall();
  },
  methods: {
    getall () {
      // this.spinShow = true
      this.$api.GetVideoList().then(
        res => {
          if (!res.error) {
            this.playList = res.Data;
            //            this.videoOptions.sources[0]=this.playList[0]
          } else {
            this.$Notice.warning({
              title: '数据异常',
              desc: this.msg
            });
          }
        },
        error => {
          this.$Notice.warning({
            title: '数据异常',
            desc: error
          });
        }
      );
    }
  }
};
</script>
